import React, {
	Component
}
from 'react';
import {
	Row, Col, Icon
}
from 'antd';

import {
	Link
}
from 'react-router';

class TopNav extends Component {
	constructor(props) {
		super(props);
		this.state = {};

		this.bind();
	}
	bind(){
		$(window).on('scroll', function(){
			var st = $(this).scrollTop();

			if(st > 10){
				$('.top-nav-bar').addClass('fixed');
			}else{
				$('.top-nav-bar').removeClass('fixed');
			}
		})
	}
	render() {
		var mod = this.props.active;

		return (
			<Row className="top-nav-bar" ref="top-nav-bar">
				<Col span="20" offset="2">
					<a className="logo">
						<img src="http://static.mukewang.com/static/img/common/logo.png"/>
					</a>
					<ul className="top-nav">
						<li>
							<Link to="/">订餐</Link>
						</li>
						<li>
							<Link to="/list">订餐列表</Link>
						</li>
					</ul>
					<div className="phones">
						<span className="phone">
							<Icon type="phone"/>010-62071929(和合谷)
						</span>
						<span className="phone">
							<Icon type="phone"/>010-62016158(宏状元)
						</span>
					</div>
					
				</Col>
			</Row>
		)
	}
}

export {
	TopNav
}
